<?php


include("classes/include.php");

session_start();

if(isset($_POST['enregistrerResp']))
{
	
	if(isset($_POST['nomResp'])
		&& isset($_POST['prenomResp'])
		&& isset($_POST['emailResp'])
		&& isset($_POST['telResp']))
		{
			
			$nom = $_POST['nomResp'];
			$prenom = $_POST['prenomResp'];
			$email = $_POST['emailResp'];
			$telephone = $_POST['telResp'];
			
			$numEnt = $_POST['numEntreprise'];
			
			$entreprise = new Entreprise($numEnt);
			
			$responsable = new ResponsableEntreprise(-1, $nom, $prenom, $telephone, $email, $entreprise);
			
			$responsable->ajouter();
			
		}
	
	
	header("Location: administrationAjoutStage.php");
	
}


?>